package kpi.java_training.testing.commands;

import kpi.java_training.testing.Testing;

/**
 *  class which implements break command
 */
public class BreakCommand extends Command {

    public BreakCommand(Testing test) {
        super(test);
    }

    @Override
    public String toString() {
        return "Stopping test and saving it's progress to continue later...";
    }

    @Override
    public void execute() {
        test.saveSession();
        test.endTest();
    }

    @Override
    public boolean itsMe(String string) {
        return string.equals("@break");
    }
}
